package com.study.proxy.jdk;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

public class BuyHouseProxy implements InvocationHandler {

	private BuyHouse target;

	public BuyHouseProxy(BuyHouse tartget) {
		this.target = tartget;
	}

	@Override
	public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
		System.out.println("买房前准备");
		Object o =method.invoke(target,args);
		System.out.println("买后前装修");
		return o;
	}
}
